<h2>mach_port_type</h2>
<hr>
<p>
<strong>Function</strong> - Return the characteristics of the target port name.
<h3>SYNOPSIS</h3>
<pre>
<strong>kern_return_t   mach_port_type</strong>
                <strong>(ipc_space_t</strong>                               <var>task</var>,
                 <strong>mach_port_name_t</strong>                          <var>name</var>,
                 <strong>mach_port_type_t</strong>                         <var>ptype</var><strong>);</strong>
</pre>
<h3>PARAMETERS</h3>
<dl>
<p>
<dt> <var>task</var> 
<dd>
[in task send right]
The task whose port name space is queried.
<p>
<dt> <var>name</var> 
<dd>
[in scalar]
The name being queried.
<p>
<dt> <var>ptype</var> 
<dd>
[out scalar]
The type of the name.  Indicates what kind of right the task 
holds for the port, port set, or dead name.
</dl>
<h3>DESCRIPTION</h3>
<p>
The <strong>mach_port_type</strong> function returns information about <var>task</var>'s 
rights for a specific name in its port name space.  The returned 
<var>ptype</var> is a bit-mask indicating what rights <var>task</var> 
holds with this name.  
The bit-mask is composed of the following bits:
<dl>
<dt> <strong>MACH_PORT_TYPE_SEND</strong>
<dd>
The name denotes send rights.
<p>
<dt> <strong>MACH_PORT_TYPE_RECEIVE</strong>
<dd>
The name denotes a receive right.
<p>
<dt> <strong>MACH_PORT_TYPE_SEND_ONCE</strong>
<dd>
The name denotes a send-once right.
<p>
<dt> <strong>MACH_PORT_TYPE_PORT_SET</strong>
<dd>
The name denotes a port set.
<p>
<dt> <strong>MACH_PORT_TYPE_DEAD_NAME</strong>
<dd>
The name is a dead name.
<p>
<dt> <strong>MACH_PORT_TYPE_DNREQUEST</strong>
<dd>
A dead-name request has been registered for the right.
</dl>
<h3>NOTES</h3>
<p>
This interface is machine word length specific because of the port name
parameter.
<h3>RETURN VALUES</h3>
<dl>
<p>
<dt> <strong>KERN_INVALID_NAME</strong>
<dd>
<var>name</var> did not denote a right.
</dl>
<h3>RELATED INFORMATION</h3>
<p>
Functions:
<a href="mach_port_names.html"><strong>mach_port_names</strong></a>,
<a href="mach_port_get_attributes.html"><strong>mach_port_get_attributes</strong></a>,
<a href="mach_port_get_set_status.html"><strong>mach_port_get_set_status</strong></a>.
